package bairui.international.model.type;

/**
 *
 * (性别)Type_Gender
 */
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@com.lianjing.sh.model.common.annotation.Comment("性别")
@com.lianjing.sh.processing.info.annotation.InfoComment("性别")
public enum Type_Gender implements com.sh_lianjing.standard.EnumCommentable<Type_Gender> {

	/**
	 * (男)Man</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("男")
	@com.lianjing.sh.processing.info.annotation.InfoComment("男")
	Man("男")
,
	/**
	 * (女)Woman</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("女")
	@com.lianjing.sh.processing.info.annotation.InfoComment("女")
	Woman("女")
;

	private static java.util.Map<String, Type_Gender> Cache = new java.util.HashMap<>();
	static{
		for(Type_Gender enumItem : Type_Gender.values()){
			Cache.put(enumItem.getComment(), enumItem);
		}
	}

	private String comment;

	private Type_Gender(String comment){
		this.comment = comment;
	}

	@Override
	public String toString() {
		return comment;
	}

	@Override
	public String getComment() {
		return comment;
	}

	@Override
	public Type_Gender parseByComment(String comment) {
		return Type_Gender.parse(comment);
	}

	public static Type_Gender parse(String comment) {
		Type_Gender enumItem = Cache.get(comment);
		if(null == enumItem){
			 throw new com.sh_lianjing.standard.exception.EnumCommentableException(Type_Gender.class, comment);
		}
		return enumItem;
	}

}
